#ifndef _DEV_TCPSERVER_H_
#define _DEV_TCPSERVER_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <types.h>
#include "device.h"
#include "netcore.h"

struct tcp_svr_cfg
{
    const char *ethname;

    ip_addr_t   local_ip;
    u16         local_port;
};

int tcp_svr_dev_add(const char *name, const struct tcp_svr_cfg *cfg);
void tcp_svr_free(device_t *dev);

#ifdef __cplusplus
}
#endif
#endif
